<%@ page pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<div class="shield-show">
    <table class="tab-list  shield-table-odd tablesAllCodeGen">
        <col width="60">
        <col width="60">
        <col width="">
        <col width="150">
        <col width="">
        <col width="55">
        <caption>符合搜索条件的表
            <input type="button" class="shieldA button" shieldParams="{'conn':'${conn}'}"
                   paramSelector=":checkbox[name='tableName']"
                   data-method="post" data-url="${ctxPathA}/system/outdatabase/exportexcel" value="导出Excel表结构"/>
            <input type="button" class="shieldA" shieldParams="{'conn':'${conn}'}"
                   paramSelector=":checkbox[name='tableName']"
                   data-method="post" data-url="${ctxPathA}/system/outdatabase/exportword" value="导出Word表结构"/>
            <input type="button" class="shieldA" shieldParams="{'conn':'${conn}'}"
                   paramSelector=":checkbox[name='tableName']"
                   data-method="post" data-url="${ctxPathA}/system/outdatabase/exportpdf" value="导出PDF表结构"/>
        </caption>
        <tr>
            <th class="w60 taCenter"><input type="checkbox" id="checkall" value=${conn}/></th>
            <th class="taCenter">序号</th>
            <th class="taLeft">表名</th>
            <th class="taLeft">数据量</th>
            <th class="taLeft">注释</th>
            <th class="taCenter">操作</th>
        </tr>
        <c:forEach var="model" items="${list }" varStatus="var">
            <tr class="datatr">
                <td class="taCenter"><input type="checkbox" name="tableName" value="${model.tableName}"/></td>
                <td style="text-align: center;">${(pageBean.currentPage -1)*pageBean.pageSize+var.count }</td>
                <td class="datatd">${model.tableName }</td>
                <td class="datatd">${model.dataSize }</td>
                <td class="datatd" type="checkbox" name="tableComments"
                    value="${model.tableComments}">${model.tableComments }</td>
                <td class="taCenter">
                    <a data-url="${ctxPathA }/system/outdatabase/databaseShow"
                       shieldParams="{'tableName':'${model.tableName }','tableComments':'${model.tableComments }','conn':'${conn }'}"
                       class="shieldDialog" viewTitle='${model.tableName}表'
                       viewWidth="650"><img src="${ctxPath }/images/icon/view.png" class="show c_p" title="详情"/></a>
                </td>
            </tr>
        </c:forEach>
        <c:if test="${empty list }">
            <!-- 无数据时展示，有数据时展示上面的列表 -->
            <tr>
                <td colspan="6" class="taCenter">没有表信息！</td>
            </tr>
        </c:if>
    </table>
</div>
<script type="text/javascript">
    /* 保存原始html信息，用于搜索 */
    var tableE = ShieldJS.contentMainE.find(".tablesAllCodeGen");
    tableE.find("td").each(function (i, n) {
        $(this).data("html", $(this).html());
    });
</script>
